CiscoXaaSBilling

(0 reviews)

Java - Code Sample

NOTE: These are untested code samples provided for a conceptual understanding only. # Request / Response```java

OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"uuid\": \"jhfsdjkhfsdkh3489434\",\n \"createdBy\": \"user_id\",\n \"createdDateTime\": \"2017-01-24T16:00:00-08:00\",\n \"billingAddressId\": 123456789,\n \"invoiceList\": [\n {\n \"invoiceNumber\": 123\n },\n {\n \"invoiceNumber\": 456\n }\n ],\n \"beginDate\": \"2017-01-31\",\n \"endDate\": \"2017-01-31\",\n \"pageNumber\": 1\n}\n");
Request request = new Request.Builder()
.url("https://apx.cisco.com/ccw/api/sbp/v1.0/subscription/usage")
.post(body)
.addHeader("content-type", "application/json")
.addHeader("authorization", "Bearer uIQxCGrC6etCBY2ufYozpVU10hwE")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
```


Reviews